package org.apache.kylin.common.util;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

/**
 * Created by taoliu on 2016/12/1.
 */
public class LockUtils {
   public static ILock getTaskHdfsLock(String lockRoot) throws IllegalAccessException, InvocationTargetException, InstantiationException, NoSuchMethodException, ClassNotFoundException {
       Class clazz = Class.forName("org.apache.kylin.engine.mr.steps.TaskHdfsLock");
       Constructor constructor = clazz.getConstructor(String.class);
       return (ILock) constructor.newInstance(lockRoot);
   }
}
